# Contributor: Oliver Smith <ollieparanoid@postmarketos.org>
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
pkgname=mrhlpr
pkgver=1.0.3
pkgrel=0
pkgdesc="postmarketOS tools for interacting with gitlab MRs"
url="https://gitlab.com/postmarketOS/mrhlpr"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 git mrhlpr-common"
makedepends="py3-setuptools"
checkdepends="pytest"
source="$pkgname-$pkgver.tar.gz::https://gitlab.com/postmarketos/mrhlpr/-/archive/$pkgver/mrhlpr-$pkgver.tar.gz"
options="!check" # no testsuite
subpackages="mrhlpr-common mrtest"

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

common() {
	depends="python3"
	amove usr/lib/python3*/site-packages/mrhlpr*
}

mrtest() {
	pkgdesc="Installs apks from pmaports/aports MRs"
	url="https://wiki.postmarketos.org/wiki/Mrtest"
	depends="mrhlpr-common"
	amove \
		usr/lib/python3*/site-packages/mrtest \
		usr/bin/mrtest
}

sha512sums="
d4e16c3fbc85d6b2bd0d2c7e3a173397c6cf8479aef181fe0baf3dfb1207fd6b269e1da1806b918e08bdbec164417bda2960cac459cf6d307ded2bc90f7fade7  mrhlpr-1.0.3.tar.gz
"
